//
//  ModifyCollectionViewCell.m
//  Daybook
//
//  Created by liutaifeng on 16/5/26.
//  Copyright © 2016年 zhangbin. All rights reserved.
//

#import "ModifyCollectionViewCell.h"

@implementation ModifyCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView {
    self.backView = [[UIView alloc] init];
    [self.contentView addSubview:_backView];
    
    self.picImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:_picImageView];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _picImageView.frame = CGRectMake(0, 0, self.contentView.frame.size.width / 5 * 4, self.contentView.frame.size.height / 5 * 4);
    _picImageView.center = self.contentView.center;
    _backView.frame = CGRectMake(2, 2, self.contentView.frame.size.width - 4, self.contentView.frame.size.height - 4);
}
- (void)setPicImageView:(UIImageView *)picImageView {
    if (_picImageView != picImageView) {
        _picImageView = picImageView;
    }
}
- (void)setBackView:(UIView *)backView {
    if (_backView != backView) {
        _backView = backView;
    }
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
